This is a simple vulnerability scanner that scans the given services, according to their ports and service types, for the possible vulnerabilities from tht NVD library.
- Clone the repository
- Install the required libraries using the
requirements.txtfile located in the project root directory:
pip install -r requirements.txtA simple docker-compose file is provided for running some services and their corresponding versions are added to the services.json file, but you can use any other services as well.
- Update the services.json file according to the services you want to scan (The services.json file is already updated with the services in the docker-compose file, you can also specify any other json file with the services you want to scan, but pay attention to include the services in the same format as in the services.json file.)
- Run the scanner (A docker-file is also provided if you want to run the scanner in a container)
python scan-vulns.pyTo run the scanner with a different list of services, specify the name of the file as following
python scan_vulns.py services_v2.jsonThe scanner modules has different functions to scan and find the version of specific softwares. Currently, WordPress, Apache, MySQL and PostgreSQL services can be scanned. The scanner can be extended by adding the functionality to scan other services as well. To do this, you would need to add a new function in the scanner module that can detect the version of the new service. But pay attention for the NVD library to work as expected, only the name and version number of that software must be returned.
The scanner will output the vulnerabilities found in the services in the following format:
{'url': 'https://nvd.nist.gov/vuln/detail/CVE-2019-10211', 'id': 'CVE-2019-10211', 'severity': 'CRITICAL', 'score': 9.8, 'description': 'DESCRIPTION'}
The vulnerabilities are sorted by their severity and score. The 'score' represents the severity of the vulnerability on a scale from 0 to 10, with 10 being the most severe. The 'severity' field is a qualitative rating of the vulnerability's potential impact. The 'description' field provides a brief description of the vulnerability.
For any questions or suggestions, please open an issue on this GitHub repository